#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <stdlib.h>

int main()
{
	int* p = (int*)malloc(10 * sizeof(int));
	if (p != NULL)
	{
		int i = 0;
		for (i = 0; i < 10; i++)
		{
			p[i] = i;
		}
		p = realloc(p, 5 * sizeof(int));
	}
	return 0;
}